package pl.ericpol.stubs;

import java.util.Random;

import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;

import pl.ericpol.environment.devices.lamps.Lamp;

public class LampAdapterStub extends Lamp{
	
	private Random random = new Random();
	private static Logger logger = LogManager.getLogger(LampAdapterStub.class);

	public LampAdapterStub(int id) {
		super(id);
	}

	@Override
	public int getPercent() {
		int percent = random.nextInt(100);
		logger.info("Lamp with id "+getId()+" return percent:"+ percent);
		return percent;
	}

	@Override
	public void switchOn(int percent) {
		int percent1 = random.nextInt(100);
		logger.info("Lamp with id "+getId()+" switch on with percent:"+percent1);		
	}

}
